package com.authentication.center.model;

import java.util.Date;
import javax.persistence.*;
import lombok.Data;

/**
 * @author garvin
 * @date 2020-05-21
 */
@Data
@Table(name = "t_app_user")
public class AppUser {
    /**
     * 主键ID
     */
    @Id
    private Long id;

    /**
     * 应用ID
     */
    @Column(name = "app_id")
    private Long appId;

    /**
     * 用户密码
     */
    private String password;

    /**
     * 用户名
     */
    private String username;

    /**
     * 手机号码
     */
    private String phone;

    /**
     * 邮箱地址
     */
    private String email;

    /**
     * 真实姓名
     */
    @Column(name = "real_name")
    private String realName;

    /**
     * 身份证号码
     */
    @Column(name = "id_card")
    private String idCard;

    /**
     * 用户是否可用
     */
    private Boolean disabled;

    /**
     * 用户是否被锁定
     */
    @Column(name = "account_locked")
    private Boolean accountLocked;

    /**
     * 用户是否过期
     */
    @Column(name = "account_expired")
    private Boolean accountExpired;

    /**
     * 用户过期时间
     */
    @Column(name = "account_expired_time")
    private Date accountExpiredTime;

    /**
     * 密码是否过期
     */
    @Column(name = "credentials_expired")
    private Boolean credentialsExpired;

    /**
     * 密码过期时间
     */
    @Column(name = "credentials_expired_time")
    private Date credentialsExpiredTime;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 创建时间
     */
    @Column(name = "created_time")
    private Date createdTime;

    /**
     * 更新人
     */
    @Column(name = "updated_by")
    private String updatedBy;

    /**
     * 更新时间
     */
    @Column(name = "updated_time")
    private Date updatedTime;

    public static final String ID = "id";

    public static final String DB_ID = "id";

    public static final String APP_ID = "appId";

    public static final String DB_APP_ID = "app_id";

    public static final String PASSWORD = "password";

    public static final String DB_PASSWORD = "password";

    public static final String USERNAME = "username";

    public static final String DB_USERNAME = "username";

    public static final String PHONE = "phone";

    public static final String DB_PHONE = "phone";

    public static final String EMAIL = "email";

    public static final String DB_EMAIL = "email";

    public static final String REAL_NAME = "realName";

    public static final String DB_REAL_NAME = "real_name";

    public static final String ID_CARD = "idCard";

    public static final String DB_ID_CARD = "id_card";

    public static final String DISABLED = "disabled";

    public static final String DB_DISABLED = "disabled";

    public static final String ACCOUNT_LOCKED = "accountLocked";

    public static final String DB_ACCOUNT_LOCKED = "account_locked";

    public static final String ACCOUNT_EXPIRED = "accountExpired";

    public static final String DB_ACCOUNT_EXPIRED = "account_expired";

    public static final String ACCOUNT_EXPIRED_TIME = "accountExpiredTime";

    public static final String DB_ACCOUNT_EXPIRED_TIME = "account_expired_time";

    public static final String CREDENTIALS_EXPIRED = "credentialsExpired";

    public static final String DB_CREDENTIALS_EXPIRED = "credentials_expired";

    public static final String CREDENTIALS_EXPIRED_TIME = "credentialsExpiredTime";

    public static final String DB_CREDENTIALS_EXPIRED_TIME = "credentials_expired_time";

    public static final String CREATED_BY = "createdBy";

    public static final String DB_CREATED_BY = "created_by";

    public static final String CREATED_TIME = "createdTime";

    public static final String DB_CREATED_TIME = "created_time";

    public static final String UPDATED_BY = "updatedBy";

    public static final String DB_UPDATED_BY = "updated_by";

    public static final String UPDATED_TIME = "updatedTime";

    public static final String DB_UPDATED_TIME = "updated_time";
}